When you want to control the flow of your program's logic according to the value of a certain variable, the Switch statement is the perfect thing to use.
int foobar =2;switch(foobar){case1:return'case was equal to 1';break;case2:return'case was equal to 2';break;case3:return'case was equal to 3';break;}
This would return: "case was equal to 2."